package com.stone.boot.stoneboot.module.serverinfo.controller;

import com.stone.boot.stoneboot.module.serverinfo.controller.vo.ServerInfoUploadVO;
import com.stone.boot.stoneboot.module.serverinfo.service.ServerInfoService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 后台管理 - 服务注册与发现
 */
@RestController
@RequestMapping("/serverInfo")
public class ServerInfoController {

    @Resource
    private ServerInfoService serverInfoService;

    /**
     * 服务注册
     */
    @PostMapping("/register")
    public String register(@RequestBody ServerInfoUploadVO serverInfoUploadVO) {
        serverInfoService.register(serverInfoUploadVO);
        return "200";
    }

}
